package com.framework.service;

import com.baomidou.mybatisplus.service.IService;
import com.framework.entity.ter.IntegralAgentSn;
import com.framework.entity.ter.TerTerminalInfo;

import java.util.List;

/**
 * @author wq
 * @date 2019/10/21 11:55
 * @description
 */
public interface IntegralAgentSnService extends IService<IntegralAgentSn> {
    /***
     * 添加需要返还积分的sn记录
     * @param agentId
     * @param integralTerminalList
     */
    void addRecord(Long agentId, List<TerTerminalInfo> integralTerminalList);

    /**
     * 根据condition保存或修改 true:insert false:update
     * @param integralAgentSn
     * @param condition
     */
    void save(IntegralAgentSn integralAgentSn, boolean condition);

    /**
     * 根据id获取
     * @param agentId
     * @return
     */
    IntegralAgentSn findOneByAgentId(Long agentId);

    /**
     * 根据sn查询
     * @param sn
     * @return
     */
    IntegralAgentSn findBySn(String sn);

    /**
     * 去除已激活的sn
     * @param integralAgentSn
     * @param sn
     */
    void dropSn(IntegralAgentSn integralAgentSn,String sn);
}
